package com.example.springbootopenfeign.feign;

import com.example.springbootopenfeign.config.DefaultFeignConfiguration;
import com.example.springbootopenfeign.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

//@FeignClient(name = "TestOpenFeignDemo",url = "http://localhost:8080",configuration = DefaultFeignConfiguration.class)
@FeignClient(name = "TestOpenFeignDemo",url = "http://localhost:8080")
public interface ServiceDemoFeign {

    /**
     * 获取用户列表
     * @return
     */
    @GetMapping("/getUser")
    User getUser();


    @GetMapping("/getHeaderName")
    String getHeaderName(@RequestHeader("name")String name);



}

